package com.controller;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.entity.CstCustomer;
import com.mangofactory.swagger.models.dto.Model;
import com.service.CstCustomerService;

@Controller
public class CstCustomerController {
	@Autowired
	private CstCustomerService cstCustomerService;
	/*异步查询所有*/
	//使用@responseBody注解返回异步数据
	@ResponseBody  //表示返回的数据显示输出到页面中
	@RequestMapping("getallcstc.s")
	public List<CstCustomer> getAllSalChance(Model model) throws Exception{
		List<CstCustomer>list= cstCustomerService.selectAllCst();
		return list;
	}
	
	@ResponseBody
	@RequestMapping("selallcst.s")
	public String selAllCst()throws Exception{
		
		return "";
	}
}
